package com.shop.service.impl;

import com.shop.entity.BrandCountChart;
import com.shop.entity.BrandPriceChart;
import com.shop.entity.Phone;
import com.shop.entity.PhoneAttr;
import com.shop.mapper.PhoneMapper;
import com.shop.service.PhoneService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2023-03-04
 */
@Service
public class PhoneServiceImpl extends ServiceImpl<PhoneMapper, Phone> implements PhoneService {

    @Autowired
    PhoneMapper phoneMapper;

    @Override
    public List<Integer> getPhoneMemory() {
        return phoneMapper.getPhoneMemory();
    }

    @Override
    public List<Integer> getPhoneDisk() {
        return phoneMapper.getPhoneDisk();
    }

    @Override
    public List<Phone> queryByAttr(PhoneAttr phone) {
        return phoneMapper.queryByAttr(phone);
    }

    @Override
    public Integer countByAttr(PhoneAttr phoneAttr) {
        return phoneMapper.countByAttr(phoneAttr);
    }

    @Override
    public List<BrandCountChart> getBrandCount() {
        return phoneMapper.getBrandCount();
    }

    @Override
    public List<BrandPriceChart> getBrandPriceCount() {
        return phoneMapper.getBrandPriceCount();
    }
}
